<?php

// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use \think\Request;
use \think\Route;
$pathinfo = strtolower(Request::instance()->pathinfo());
$pathinfo = $pathinfo == '' ? $pathinfo . '/' : $pathinfo;
// if (preg_match('/^h5\//', $pathinfo) || !preg_match('/^pc\//',$pathinfo) ) {
	// header('location:'.$pathinfo);exit;
    // return true;
// };
if (!preg_match('/^api\//', $pathinfo) && !preg_match('/^admin\//',$pathinfo) && !preg_match('/^user\//',$pathinfo)&& !preg_match('/^portal\//',$pathinfo)) {
    \think\Route::bind('index');
};
//Route::get('gaoji',"portal/alipay/fugao");
return [
    //别名配置,别名只能是映射到控制器且访问时必须加上请求的方法
    '__alias__'   => [
		//'user' => 'index/User/',
		//'user/login/zhukao' => 'index/User/Login/Zhukao',
//		'gaoji' => 'portal/alipay/fugao',
    ],
    //变量规则
    '__pattern__' => [
    ],
//        域名绑定到模块
//        '__domain__'  => [
//            'admin' => 'admin',
//            'api'   => 'api',
//        ],
];
